/*
 *    Copyright (c) 2018-2025, lengleng All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *
 * Redistributions of source code must retain the above copyright notice,
 * this list of conditions and the following disclaimer.
 * Redistributions in binary form must reproduce the above copyright
 * notice, this list of conditions and the following disclaimer in the
 * documentation and/or other materials provided with the distribution.
 * Neither the name of the pig4cloud.com developer nor the names of its
 * contributors may be used to endorse or promote products derived from
 * this software without specific prior written permission.
 * Author: lengleng (wangiegie@gmail.com)
 */

package com.pig4cloud.pigx.shop.user.api.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 商城用户
 *
 * @author pigx code generator
 * @date 2023-11-30 19:47:26
 */
@Data
@TableName("shop_user")
@EqualsAndHashCode(callSuper = true)
@Schema(description = "商城用户")
public class ShopUser extends Model<ShopUser> {

	private static final long serialVersionUID = 1L;

	/**
	 * id
	 */
	@TableId(type = IdType.AUTO)
	@Schema(description = "id")
	private Long id;

	/**
	 * 推广渠道编号
	 */
	@Schema(description = "推广渠道编号")
	private String channelCode;

	/**
	 * 父ID
	 */
	@Schema(description = "父ID")
	private Long parentId;

	/**
	 * 层级
	 */
	@Schema(description = "层级")
	private String ppath;

	/**
	 * 类型 1: 渠道用户 2: 普通用户
	 */
	@Schema(description = "类型 1: 渠道用户 2: 普通用户")
	private String shopUserType;

	/**
	 * 登录账号
	 */
	@Schema(description = "登录账号")
	private String loginAccount;

	/**
	 * 会员昵称
	 */
	@Schema(description = "会员昵称")
	private String nickName;

	/**
	 * 微信openId
	 */
	@Schema(description = "微信openId")
	private String wechatOpenId;

	/**
	 * 用户头像
	 */
	@Schema(description = "用户头像")
	private String headerUrl;

	/**
	 * 真实姓名
	 */
	@Schema(description = "真实姓名")
	private String realName;

	/**
	 * 手机号
	 */
	@Schema(description = "手机号")
	private String phone;

	/**
	 * 注册平台
	 */
	@Schema(description = "注册平台")
	private String platform;

	/**
	 * 邀请码
	 */
	@Schema(description = "邀请码")
	private String invitedCode;

	/**
	 * 备注
	 */
	@Schema(description = "备注")
	private String remark;

	/**
	 * 销售代表ID
	 */
	@Schema(description = "销售代表ID")
	private Long salesShopUserId;

	/**
	 * 部门ID
	 */
	@Schema(description = "部门ID")
	@TableField(updateStrategy = FieldStrategy.IGNORED)
	private Long deptId;

	/**
	 * 用户来源 1: 手动注册 2: excel导入
	 */
	@Schema(description = "用户来源 1: 手动注册 2: excel导入")
	private String registerSource;

	/**
	 * 注册方式 1: 搜索 2: 分享好友 3: 分享朋友圈 4: 扫码
	 */
	@Schema(description = "注册方式 1: 搜索 2: 分享好友 3: 分享朋友圈 4: 扫码")
	private String registerType;

	/**
	 * 删除标记
	 */
	@TableLogic
	@Schema(description = "删除标记")
	private String delFlag;

	/**
	 * 创建人
	 */
	@TableField(fill = FieldFill.INSERT)
	@Schema(description = "创建人")
	private String createBy;

	/**
	 * 修改人
	 */
	@TableField(fill = FieldFill.UPDATE)
	@Schema(description = "修改人")
	private String updateBy;

	/**
	 * 创建时间
	 */
	@Schema(description = "创建时间")
	@TableField(fill = FieldFill.INSERT)
	private LocalDateTime createTime;

	/**
	 * 修改时间
	 */
	@Schema(description = "修改时间")
	@TableField(fill = FieldFill.UPDATE)
	private LocalDateTime updateTime;

}
